package com.zh.note.huawei.onehundred.字符串加密;

import java.util.Scanner;

/**
 * @Author: zhanghuan
 * @date: 2023/9/4 09:40
 * @description: create it
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        if (n < 1 || n > 1000) {
            System.out.println("input error");
            return;
        }
        String[] strs = new String[n];
        for (int j = 0; j < n; j++) {
            strs[j] = sc.nextLine();
        }
        int[] array = {1, 2, 4};
        long[] offset = new long[50];
        for (int j = 0; j < offset.length; j++) {
            if (j < 3) {
                offset[j] = array[j];
            } else {
                offset[j] = offset[j - 1] + offset[j - 2] + offset[j - 3];
            }
        }
        for (String str : strs) {
            char[] chars = str.toCharArray();
            for (int i = 0; i < chars.length; i++) {
                char ch = chars[i];
                // 移动公式
                chars[i] = (char) ((ch - 'a' + offset[i]) % 26 + 'a');
            }
            String res = new String(chars);
            System.out.println(res);
        }
    }
}
